// Saves options to localStorage.
function save_options() {
  var selectEvents = document.getElementById("events");
  var events = selectEvents.children[selectEvents.selectedIndex].value;
  localStorage["events"] = events;
  
  var selectRedeem = document.getElementById("redeem");
  var redeem = selectRedeem.children[selectRedeem.selectedIndex].value;
  localStorage["redeem"] = redeem;
  
  var selectHome = document.getElementById("home");
  var home = selectHome.children[selectHome.selectedIndex].value;
  localStorage["home"] = home;
  
  var selectGames = document.getElementById("games");
  var games = selectGames.children[selectGames.selectedIndex].value;
  localStorage["games"] = games;
  
  var selectDownload = document.getElementById("download");
  var download = selectDownload.children[selectDownload.selectedIndex].value;
  localStorage["download"] = download;
  
  var selectCompetitive = document.getElementById("competitive");
  var competitive = selectCompetitive.children[selectCompetitive.selectedIndex].value;
  localStorage["competitive"] = competitive;
  
  var selectClanPoints = document.getElementById("clanPoints");
  var clanPoints = selectClanPoints.children[selectClanPoints.selectedIndex].value;
  localStorage["clanPoints"] = clanPoints;
  
  var selectClanDate = document.getElementById("clanDate");
  var clanDate = selectClanDate.children[selectClanDate.selectedIndex].value;
  localStorage["clanDate"] = clanDate;
  
  var selectClanPagination = document.getElementById("clanPagination");
  var clanPagination = selectClanPagination.children[selectClanPagination.selectedIndex].value;
  localStorage["clanPagination"] = clanPagination;
  
    var selectCommunity = document.getElementById("community");
  var community = selectCommunity.children[selectCommunity.selectedIndex].value;
  localStorage["community"] = community;
  
    var selectCalendar = document.getElementById("calendar");
  var calendar = selectCalendar.children[selectCalendar.selectedIndex].value;
  localStorage["calendar"] = calendar;
  
  var selectForumPagination = document.getElementById("forumPagination");
  var forumPagination = selectForumPagination.children[selectForumPagination.selectedIndex].value;
  localStorage["forumPagination"] = forumPagination;
  
  var selectDefaultFont = document.getElementById("defaultFont");
  var defaultFont = selectDefaultFont.children[selectDefaultFont.selectedIndex].value;
  localStorage["defaultFont"] = defaultFont;
  
  var selectAddMembers = document.getElementById("addMembers");
  var addMembers = selectAddMembers.children[selectAddMembers.selectedIndex].value;
  localStorage["addMembers"] = addMembers;
  
  var textBoxImageSize = document.getElementById("imageSize");
  var imageSize = textBoxImageSize.value;
  localStorage["imageSize"] = imageSize;

  // Update status to let user know options were saved.
 // var status = document.getElementById("status");
 // status.innerHTML = "Options Saved.";
  setTimeout(function() {
  //  status.innerHTML = "";
  }, 750);
}

document.getElementById('save').addEventListener('click', save_options);